﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OsPortal;

public partial class Admin_Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void btnLogion_Click(object sender, EventArgs e)
    {
        string strUsername = username.Value.Trim();
        string strPassword = password.Value.Trim();

        string strUserNameDefault = OsPortal.oStringHelper.fncGetAppSettings("USERNAME_ADMIN");
        string strPasswordDefault = OsPortal.oStringHelper.fncGetAppSettings("PASSWORD_ADMIN");
        if (strUsername == strUserNameDefault && strPassword == strPasswordDefault)
        {
            Session["ad_userName"] = strUsername;
            Response.Redirect("default.aspx?mo=index");
        }
        else oHtmlHelper.Alert("Tài khoản không đúng - Đừng cố ", this.Page);
    }
}